const {
  getUserInfo
} = require("../src/newservice/user");
const {
  getReposInfo,
  getReposDetails
} = require("../src/newservice/repo");
const {
  getdocs,
  getDocsDetails
} = require("../src/newservice/docs");
// {
//   id: 28696178,
//   type: 'Book',
//   slug: 'ag2ub5',
//   name: '新人指南',
//   user_id: 119800,
//   description: '',
//   namespace: 'hpstream/ag2ub5',
// }
async function main() {
  let res = await getUserInfo();
  let groupRes = await getReposInfo(res.data.id);
  let details = await getReposDetails(groupRes.data[0].id);

  //获取仓库的列表
  let docs = await getdocs(details.data.id)
  //获取仓库的详情
  let val = await getDocsDetails(details.data.id, docs.data[0].slug)

  console.log(val)
}

main()